package schoolWork;

import java.util.Scanner;

public class Substrings {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String sub = input.nextLine();
        int cnt = 0;
        int scan_s = 0;
        int scan_sub = 0;
        for(scan_s = 0; scan_s < s.length(); scan_s++)
        {
            scan_sub = 0;
            while(scan_sub != sub.length())
            {
                char c = sub.charAt(scan_sub);
                if(c != s.charAt(scan_s)) {
                    break;
                }
                scan_sub++;
                scan_s++;
            }
            if(sub.length() == scan_sub)
                cnt++;
        }
        System.out.println(cnt);
    }
}
